home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- #include <a2410/typedefs.h>
- #include <a2410/devtiga.h>
- #include <clib/a2410_protos.h>
- #include <math.h>
-
- BOOL TIGA_Init(void);
- void TIGA_Close(void);
- void TIGA_Break(void);
- void TIGA_SetRandPalet(void);
-
- void DotsDemo(void);
- /* ================================================================================ */
- void main(int argc, char **argv)
- {
- if (TIGA_Init())
- {
- onbreak(TIGA_Break);
- TIGA_SetRandPalet();
- DotsDemo();
- TIGA_Close();
- }
- }
- /* ------------------------------------------------------------------------------- */
-
- void DotsDemo()
- {
- int x,y,i;
- CONFIG config;
-
- get_config(&config);
-
- for (;;)
- {
- chkabort();
- x = rand() % config.mode.disp_hres;
- y = rand() % config.mode.disp_vres;
- i = rand() % config.mode.palet_size;
- set_fcolor(i);
- draw_point(x, y);
- }
- }
- /* ------------------------------------------------------------------------------- */
-